using System;
using System.Collections.Generic;
using System.Text;
namespace MyDMS.BusinessLayer
{
	public class UserDocument: BusinessObjectBase
	{

		#region InnerClass
		public enum UserDocumentFields
		{
			UserDocument_Code,
			User_Code,
			Document_Code,
			Shared_By,
			Shared_Date,
			Share_Comment,
			Is_Active,
			Creation_Date,
			Updation_Date
		}
		#endregion

		#region Data Members

			int _userDocument_Code;
			int _user_Code;
			int _document_Code;
			int _shared_By;
			DateTime _shared_Date;
			string _share_Comment;
			bool? _is_Active;
			DateTime? _creation_Date;
			DateTime? _updation_Date;

		#endregion

		#region Properties

		public int  UserDocument_Code
		{
			 get { return _userDocument_Code; }
			 set
			 {
				 if (_userDocument_Code != value)
				 {
					_userDocument_Code = value;
					 PropertyHasChanged("UserDocument_Code");
				 }
			 }
		}

		public int  User_Code
		{
			 get { return _user_Code; }
			 set
			 {
				 if (_user_Code != value)
				 {
					_user_Code = value;
					 PropertyHasChanged("User_Code");
				 }
			 }
		}

		public int  Document_Code
		{
			 get { return _document_Code; }
			 set
			 {
				 if (_document_Code != value)
				 {
					_document_Code = value;
					 PropertyHasChanged("Document_Code");
				 }
			 }
		}

		public int  Shared_By
		{
			 get { return _shared_By; }
			 set
			 {
				 if (_shared_By != value)
				 {
					_shared_By = value;
					 PropertyHasChanged("Shared_By");
				 }
			 }
		}

		public DateTime  Shared_Date
		{
			 get { return _shared_Date; }
			 set
			 {
				 if (_shared_Date != value)
				 {
					_shared_Date = value;
					 PropertyHasChanged("Shared_Date");
				 }
			 }
		}

		public string  Share_Comment
		{
			 get { return _share_Comment; }
			 set
			 {
				 if (_share_Comment != value)
				 {
					_share_Comment = value;
					 PropertyHasChanged("Share_Comment");
				 }
			 }
		}

		public bool?  Is_Active
		{
			 get { return _is_Active; }
			 set
			 {
				 if (_is_Active != value)
				 {
					_is_Active = value;
					 PropertyHasChanged("Is_Active");
				 }
			 }
		}

		public DateTime?  Creation_Date
		{
			 get { return _creation_Date; }
			 set
			 {
				 if (_creation_Date != value)
				 {
					_creation_Date = value;
					 PropertyHasChanged("Creation_Date");
				 }
			 }
		}

		public DateTime?  Updation_Date
		{
			 get { return _updation_Date; }
			 set
			 {
				 if (_updation_Date != value)
				 {
					_updation_Date = value;
					 PropertyHasChanged("Updation_Date");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("UserDocument_Code", "UserDocument_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("User_Code", "User_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Document_Code", "Document_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Shared_By", "Shared_By"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Shared_Date", "Shared_Date"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Share_Comment", "Share_Comment",200));
		}

		#endregion

	}
}
